﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DbGenerator.Model.units.constraint.root;
using DbGenerator.Utilities;
using DbGenerator.Model.attributes.types;
using DbGenerator.Model.units.table;

namespace DbGenerator.Model.units.constraint.types
{
    public class TFKConstraint : TConstraintBase<TFKAttribute>
    {
        #region ctors
        public TFKConstraint(TFKAttribute fkAttribute)
            : base(fkAttribute)
        {
            _UpdateRule = fkAttribute.UpdateRule;
            _DeleteRule = fkAttribute.DeleteRule;
            _ReferencedTableName = fkAttribute.ReferencedTableName;
        }
        #endregion

        #region properties
        private string _ReferencedColumnName;
        public string ReferencedColumnName
        {
            get { return _ReferencedColumnName; }
        } 
        
        private string _ReferencedTableName;
        public string ReferencedTableName
        {
            get { return _ReferencedTableName; }
        }
        
        private EFKRule _UpdateRule;
        public EFKRule UpdateRule
        {
            get { return _UpdateRule; }
            set { _UpdateRule = value; }
        }

        private EFKRule _DeleteRule;
        public EFKRule DeleteRule
        {
            get { return _DeleteRule; }
            set { _DeleteRule = value; }
        }
        #endregion
    }
}
